In recent, relational database systems are widely utilized for storing data in many fields. In a relational database system, same types of data is logically collected and stored in a logical table. Each one of data items constituting the table is referred to as a row and the one row is composed of a plurality of columns.
By the way, as the amount of the table increases that is a collection of data with same logical attributes, there has been proposed a technology that divides a table into several segments with horizontal partitions (or row bundles) and stores them in order for a convenient management. Each one of the table segments that are physically horizontally divided is referred to as a partitioned table. The use of this table partitioning technology with partitioned tables enables a user to designate a physical location of each partitioned table to be placed, thereby giving the distribution of simultaneous accesses to the relevant table.
Meanwhile, in order to cope with the request for a rapid response speed, the relational database system has recently adopted a main memory database to store data in memories rather than disks. When the relational database system uses a memory as the main memory for data storage, performance improvement of 3-10 times can be expected, as compared to a typical disk-based database, in terms of insert, delete, and inquiry operations to the table. However, the database system capable of storing data in memory only is not suitable for storing the large amounts of data owing to the limitation of storage capacity.
The following is a brief description as to structures and properties between a disk-based relational database and a memory-based relational database.
First, to explain the structure and property of the disk-based relational database, the disk-based relational database stores table data in a disk in the form of blocks, reads a data block into an area of a buffer cache of the main memory in response to a query from a user, and performs a data processing on the data block on the main memory.
During the data processing, upon receiving a DML (Data Manipulation Language) request to change data, the data block in the buffer cache is changed on the memory and the change is stored in the disk in advance in the form of a redo log, so that the change that has not yet been reflected in the disk can be recovered without any loss when the server goes down. Furthermore, the undo log for the change is stored in an undo block in order for the overall data in an old version to be viewed.
In addition, the contents that are stored on the disk are updated with latest data in a manner of reflecting dirty data blocks that are changed in the buffer cache to the disk periodically.
However, although the disk-based relational database puts frequently used disk data blocks on the buffer cache of the main memory to improve performance, it may be subject to significant influence by IO performance of the disk because all of the data blocks, redo logs, and undo logs have to be stored in the disk. Moreover, the disk-based relational database suffers from query execution delays in reading the data blocks due to the buffer cache whose size is relatively smaller than the disk.
Next, to explain the structure and property of the memory-based relational database, unlike the disk-based relational database, the memory-based relational database basically stores table data in a memory only and stores data with only a type of back-up image at specific point in the past and log data that has changed since then in a disk for recovery of the database provided for the server down.
Thus, when accessing the data in response to the query from the user, the data can be directly read-out from the memory table. Therefore, the memory-based relational database do not experience the disk I/O delay that reads the data block into the buffer cache that would otherwise occur in the disk-based database.
In other words, it is no longer necessary for the memory-based relational database to maintain the data in the form of blocks to optimize the reading and writing disks. Further, the memory-based database eliminates the need for keeping a undo log because it ensures a bulk reading in a way of creating the past version of the data in the memory in the row unit to be connected. In addition, since there is no lock overhead that was necessary to manage the structure of the block unit, the memory-based relational database enables an optimized processing of the query from the user.
Even for the DML to cause the change in the data, the memory-based relational database stores only the redo log data that contains the change. Thus, the memory-based database has many advantages in terms of saving of the disk capacity.
However, as set forth above, the memory-based relational database cannot be used as mass data storage for its memory size limitation.
Therefore, there has been a need for providing an optimization method for query statements and logical tables that is capable of realizing a high response speed while solving the problems of capacity limitation in the memory-based relational database by means of the extension of the horizontal partitioning method of a table in the database having a hybrid storage of disk and memory.